package com.learning.platform.dto;

import com.learning.platform.entity.Lesson;
import com.learning.platform.enums.LessonType;

import java.time.LocalDateTime;

public class LessonResponse {
    private Long id;
    private Long courseId;
    private String title;
    private LessonType lessonType;
    private Boolean isFree;
    private String contentUrl;
    private String videoUrl;
    private Integer duration;
    private Integer orderNo;
    private LocalDateTime createdAt;
    
    public LessonResponse(Lesson lesson) {
        this.id = lesson.getId();
        this.courseId = lesson.getCourseId();
        this.title = lesson.getTitle();
        this.lessonType = lesson.getLessonType();
        this.isFree = lesson.getIsFree();
        this.contentUrl = lesson.getContentUrl();
        this.videoUrl = lesson.getVideoUrl();
        this.duration = lesson.getDuration();
        this.orderNo = lesson.getOrderNo();
        this.createdAt = lesson.getCreatedAt();
    }
    
    // Getters
    public Long getId() { return id; }
    public Long getCourseId() { return courseId; }
    public String getTitle() { return title; }
    public LessonType getLessonType() { return lessonType; }
    public Boolean getIsFree() { return isFree; }
    public String getContentUrl() { return contentUrl; }
    public String getVideoUrl() { return videoUrl; }
    public Integer getDuration() { return duration; }
    public Integer getOrderNo() { return orderNo; }
    public LocalDateTime getCreatedAt() { return createdAt; }
}




